home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Languages / MS Cobol4.5 / DEMO / TTDEMO.BAT < prev    next >
DOS Batch File  |  1991-05-24  |  8KB  |  147 lines

  1. echo off
  2. rem    Batch File to Compile, Link and Run the TICTAC demonstration program.
  3. rem    This batch file can be run from your DOS prompt. If you specify the
  4. rem    "animate" parameter to the batch file then the TICTAC program will be
  5. rem    compiled and then ANIMATED.
  6. cls
  7. echo .
  8. echo     *------------------* TICTAC demonstration program *-------------------*
  9. echo     *                                                                     *
  10. echo     * Please ensure that you have followed the installation instructions  *
  11. echo     * for COBOL, which are found in the COBOL Getting Started manual.
  12. echo     * This means that you have included the directory containing your     *
  13. echo     * COBOL Compiler on your DOS PATH and you will have to set up the
  14. echo     * COBDIR environment variable to also include the COBOL Compiler      *
  15. echo     * directory.                                                          *
  16. echo     *                                                                     *
  17. echo     * Press Ctrl+C to exit if you have NOT properly installed your        *
  18. echo     * COBOL Compiler, or copied the required files.                       *
  19. echo     *                                                                     *
  20. echo     *---------------------------------------------------------------------*
  21. echo .
  22. pause
  23. if not exist TICTAC.CBL goto errtic
  24. :cobret
  25. if %1. == animate. goto doanim
  26. if %1. == ANIMATE. goto doanim
  27. cls
  28. echo     *---------------------------------------------------------------------*
  29. echo     *          Compiling the TICTAC demonstration program                 *
  30. echo     *---------------------------------------------------------------------*
  31. echo on
  32. COBOL TICTAC.CBL;
  33. echo off
  34. if errorlevel 1 goto nocob
  35. echo     *---------------------------------------------------------------------*
  36. echo     *                Compiling successfully completed                     *
  37. echo     *---------------------------------------------------------------------*
  38. pause
  39. cls
  40. echo     *---------------------------------------------------------------------*
  41. echo     *                   Linking the TICTAC program                        *
  42. echo     *                                                                     *
  43. echo     *  Notice inclusion of ADIS.                                          *
  44. echo     *                                                                     *
  45. if %1. == lcobol. goto ltxtl
  46. if %1. == LCOBOL. goto ltxtl
  47. echo     *  The program will be linked to run with the shared run-time,        *
  48. echo     *  COBLIB. The EXE file created requires the file COBLIB.DLE to be    *
  49. echo     *  present in the COBOL system directories in order to operate.       *
  50. echo     *                                                                     *
  51. echo     *  Restart this batch file with the parameter, LCOBOL, to see the     *
  52. echo     *  program statically linked so that it is independent of any other   *
  53. echo     *  files at run-time. (i.e. enter TTDEMO LCOBOL)                      *
  54. goto ltxte
  55. :ltxtl
  56. echo     *  The program will be statically linked. That is, the COBOL run-time *
  57. echo     *  support required for this program is linked into the EXE file      *
  58. echo     *  making it independent of any other files at run-time.              *
  59. :ltxte
  60. echo     *                                                                     *
  61. echo     *---------------------------------------------------------------------*
  62. if %1. == lcobol. goto linkl
  63. if %1. == LCOBOL. goto linkl
  64. :linkc
  65. echo on
  66. LINK TICTAC+ADIS+ADISKEY+ADISINIT/NOD,,,COBLIB+COBAPI                           ;
  67. echo off
  68. goto linke
  69. :linkl
  70. echo on
  71. LINK TICTAC+ADIS+ADISKEY+ADISINIT/NOD,,,LCOBOL+COBAPI                           ;
  72. echo off
  73. :linke
  74. echo off
  75. echo     *---------------------------------------------------------------------*
  76. echo     *                 Linking successfully completed                      *
  77. echo     *---------------------------------------------------------------------*
  78. pause
  79. cls
  80. echo     *---------------------------------------------------------------------*
  81. echo     *                         Running TICTAC                              *
  82. echo     *                                                                     *
  83. echo     *  Can you beat the Program?    It is possible !!                     *
  84. echo     *                                                                     *
  85. echo     *---------------------------------------------------------------------*
  86. echo on
  87. TICTAC
  88. echo off
  89. echo .
  90. cls
  91. echo     *---------------------------------------------------------------------*
  92. echo     *                                                                     *
  93. echo     * Have you tried the COBOL ANIMATOR ?                                 *
  94. echo     *                                                                     *
  95. echo     * For an example of how to get going with the ANIMATOR, rerun this    *
  96. echo     * batch file with the "animate" parameter. That is, type the          *
  97. echo     * following:  "TTDEMO ANIMATE"                                        *
  98. echo     *                                                                     *
  99. echo     *---------------------------------------------------------------------*
  100. echo .
  101. goto endtic
  102. :doanim
  103. cls
  104. echo     *---------------------------------------------------------------------*
  105. echo     *     Compiling the TICTAC demonstration program for Animation        *
  106. echo     *---------------------------------------------------------------------*
  107. echo on
  108. COBOL TICTAC.CBL ANIM;
  109. echo off
  110. if errorlevel 1 goto nocob
  111. echo     *---------------------------------------------------------------------*
  112. echo     *                Compiling successfully completed                     *
  113. echo     *---------------------------------------------------------------------*
  114. pause
  115. cls
  116. echo     *---------------------------------------------------------------------*
  117. echo     *                    Animating the TICTAC program                     *
  118. echo     *---------------------------------------------------------------------*
  119. echo on
  120. ANIMATE TICTAC
  121. echo off
  122. if errorlevel 1 goto nocob
  123. echo     *---------------------------------------------------------------------*
  124. echo     *                Animating successfully completed                     *
  125. echo     *---------------------------------------------------------------------*
  126. pause
  127. goto endtic
  128. :nocob
  129. echo     ***********************************************************************
  130. echo     *                                                                     *
  131. echo     * An error occured while running the Compiler. Please ensure that you *
  132. echo     * have installed all the necessary files.                             *
  133. echo     *                                                                     *
  134. echo     ***********************************************************************
  135. goto endtic
  136. :errtic
  137. echo     ***********************************************************************
  138. echo     *                                                                     *
  139. echo     * The TICTAC program is not in the current directory. Either change   *
  140. echo     * directory or copy TICTAC.CBL from your issue disks.                 *
  141. echo     *                                                                     *
  142. echo     ***********************************************************************
  143. :endtic
  144. echo     *---------------------------------------------------------------------*
  145. echo     *                   End of TICTAC Demonstration                       *
  146. echo     *---------------------------------------------------------------------*
  147.